﻿<%--<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CRM.Models.TrainingsRequests>" %>--%>
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CRM.Database.Model.TrainingsRequests>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Заявка №  <%:Model.IdTrainingsRequest.ToString()%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Заявка №  <%:Model.IdTrainingsRequest.ToString()%> <br /> Статус: <%:Model.TrainingRequestsStatuses.NameRu %> <br /> Курс: <%:Model.CourseNameExt%></h2>

<%= Html.ActionLink("Изменить", "TrainingsRequestEdit", new {idTrainingsRequest = Model.IdTrainingsRequest}) %>    
<%= Html.ActionLink("Вернуться к списку заявок", "TrainingsRequests")%>

<br />
<br />

<%if(Model.IsRemote)
  { %>

  <table>
        <tr>
            <td>
                <%:Html.DevExpress().Label(
                  settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Целевая аудитория:";
                      settings.Width = 298;
                  }).GetHtml() %>
            </td>
            <td>
                <%:Html.DevExpress().Label(
                  settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Кол-во участников:";
                      settings.Width = 298;
                  }).GetHtml() %>
                
            </td>
        </tr>
        <tr>
            <td>
                <%:Html.DevExpress().TextBox(settings => 
                {
                    settings.Name = "AuditoriumLocalizedName";
                    settings.Width = 298;
                    settings.ReadOnly = true;
                }).Bind(Model.AuditoriumLocalizedName).GetHtml()%>
            </td>
            <td>
                <%:Html.DevExpress().TextBox(settings => 
                {
                    settings.Name = "PredictParticipantsCount";
                    settings.Width = 298;
                    settings.ReadOnly = true;
                }).Bind(Model.PredictParticipantsCount).GetHtml()%>
            </td>
        </tr>
    </table>
      
 <% } %>

<br />
<table>
    <tr>
        <td>
            <%:Html.DevExpress().Label(settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Расписание";
                      settings.Width = 147;
                  }).GetHtml() %>    
        </td>
    </tr>
    <tr>
        <td>
             <%if (Model.TrainingsSchedules != null)
              {%>
            <%:Html.DevExpress().TextBox(settings => 
                {
                    settings.Name = "TrainingsSchedules.PlannedDate.Date";
                    settings.Width = 147;
                    settings.ReadOnly = true;
                }).Bind(Model.TrainingsSchedules.PlannedDate.Date.ToLongDateString()).GetHtml()%>
            <%}%>
        </td>
        <td>
            <%if (Model.TrainingsSchedules != null)
              {%>
                   <%:Html.DevExpress().TextBox(settings =>
                    {
                        settings.Name = "TrainingsSchedules.RubricName";
                        settings.Width = 147;
                        settings.ReadOnly = true;
                    }).Bind(Model.TrainingsSchedules.RubricName).GetHtml()%>
            <%}%>
        </td>
        <td>
            <%:Html.DevExpress().TextBox( settings => 
                {
                    settings.Name = "CourseNameExt";
                    settings.Width = 147;
                    settings.ReadOnly = true;
                }).Bind(Model.CourseNameExt).GetHtml()%>
        </td>
        <td>
            <%if (Model.TrainingsSchedules != null)
              {%>
            <%:Html.DevExpress().TextBox( settings => 
                {
                    settings.Name = "TrainingsSchedules.CityName";
                    settings.Width = 147;
                    settings.ReadOnly = true;
                }).Bind(Model.TrainingsSchedules.CityName).GetHtml()%>
            <%}%>
        </td>
    </tr>
</table>

<br />

<table>
    <tr>
        <td>
            <%:Html.DevExpress().Label(settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Юр. Лицо";
                      settings.Width = 298;
                  }).GetHtml() %>
            <%:Html.DevExpress().TextBox( settings => 
                {
                    settings.Name = "CompanyExt";
                    settings.Width = 298;
                    settings.ReadOnly = true;
                }).Bind(Model.CompanyExt).GetHtml()%>
        </td>
    
        <td>
            <%:Html.DevExpress().Label(settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "ФИО";
                      settings.Width = 298;
                  }).GetHtml() %>
            <%:Html.DevExpress().TextBox( settings => 
                {
                    settings.Name = "ContactNameExt";
                    settings.Width = 298;
                    settings.ReadOnly = true;
                }).Bind(Model.ContactNameExt).GetHtml()%>
        </td>
    </tr>
    <tr>
        <td>
            <%:Html.DevExpress().Label(settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Телефон";
                      settings.Width = 298;
                  }).GetHtml() %>
            <%:Html.DevExpress().TextBox( settings => 
                {
                    settings.Name = "ContactPhoneExt";
                    settings.Width = 298;
                    settings.ReadOnly = true;
                }).Bind(Model.ContactPhoneExt).GetHtml()%>
        </td>
         <td>
            <%:Html.DevExpress().Label(settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Эл. почта";
                      settings.Width = 298;
                  }).GetHtml() %>
            <%:Html.DevExpress().TextBox( settings => 
                {
                    settings.Name = "ContactEmailExt";
                    settings.Width = 298;
                    settings.ReadOnly = true;
                }).Bind(Model.ContactEmailExt).GetHtml()%>
        </td>
    </tr>
</table>

<br />

<table>
    <tr>
        <td>
            <%:Html.DevExpress().Label(settings =>
                  {
                      settings.ControlStyle.CssClass = "lable";
                      settings.Text = "Комментарии";
                      settings.Width = 600;
                  }).GetHtml() %>
            <%:Html.DevExpress().TextBox( settings => 
                {
                    settings.Name = "Comments";
                    settings.Width = 600;
                    settings.ReadOnly = true;
                }).Bind(Model.Comments).GetHtml()%>
        </td>
    </tr>
</table>

<br />

<%if(Model.TrainingsSchedules!=null)
      if (Model.TrainingsSchedules.IdTrainingCoursesType != 3)
      {%>
        <table>
            <tr>
                <td>
                    <%:Html.DevExpress().Label(settings =>
                        {
                            settings.ControlStyle.CssClass = "lable";
                            settings.Text = "Участники";
                            settings.Width = 600;
                        }).GetHtml()%>
                    <%:Html.Action("TrainingsRequestDetailsPartal", Model.IdTrainingsRequest)%>
                </td>
            </tr>
        </table>
    <%}%>

<%Html.RenderPartial("TrainingsRequestMailLinks"); %>

</asp:Content>
